package com.smarttourism.mapper;

import com.smarttourism.domain.SHX.SHXRoom;
import com.smarttourism.domain.SHX.SHXRoomStatus;
import com.smarttourism.domain.SHX.SHXRoomType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author SHX
* @description 针对表【room】的数据库操作Mapper
* @createDate 2024-10-18 16:09:03
* @Entity com.smarttourism.domain.SHX.Room
*/
@Mapper
public interface SHXRoomMapper {

    int deleteByPrimaryKey(Long id);

    int insert(SHXRoom record);

    int insertSelective(SHXRoom record);

    SHXRoom selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SHXRoom record);

    int updateByPrimaryKey(SHXRoom record);

    SHXRoom selectRoomByRnum(int rnum);

    SHXRoomStatus selectInfoRoomStatusById(int id);
    SHXRoomType selectInfoRoomTypeById(int id);

    List<SHXRoom> findFreeRooms();

    int updateStatusToBookedByNum(int rNum);

    int updateStatusToFreeByNum(int rNum);

    int updateStatusByNum(@Param("status") int status, @Param("rNum") int rNum);

}
